[CI] PR 자동 라벨링 및 리마인더 워크플로우 추가#1
Conversation
Walkthrough두 개의 GitHub Actions 워크플로우가 추가되었으며, 하나는 PR 리뷰(submitted/dismissed) 기반 라벨링을 재사용 워크플로우로 호출하고, 다른 하나는 하루 3회(09:00,14:00,17:00 UTC) 스케줄 및 수동 실행 가능한 PR 리마인더를 재사용 워크플로우로 호출하도록 구성했다. 권한과 시크릿 전달이 명시되었다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Reviewer
participant GH as GitHub Actions
participant ReusableLabel as reusable-label-on-approve
Reviewer->>GH: pull_request_review submitted/dismissed
activate GH
GH->>ReusableLabel: Call reusable workflow (permissions set, secrets inherited)
activate ReusableLabel
ReusableLabel-->>GH: Update/apply labels
deactivate ReusableLabel
deactivate GH
sequenceDiagram
autonumber
participant Cron as Scheduler (09:00,14:00,17:00 UTC)
participant GH as GitHub Actions
participant ReusableReminder as reusable-pr-reminder
participant Slack as Slack Webhook
Cron-->>GH: Scheduled trigger
GH->>ReusableReminder: Call reusable workflow (pass SLACK_WEBHOOK_URL, inherit secrets)
activate ReusableReminder
ReusableReminder->>Slack: Post PR reminders
deactivate ReusableReminder
Note over GH,ReusableReminder: Manual run via workflow_dispatch 가능
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/labeler.yml(1 hunks).github/workflows/pr-reminder.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/labeler.yml (1)
7-13: 구성이 깔끔합니다.재사용 워크플로 호출과 필요한 권한 설정이 모두 잘 맞춰졌습니다.
670fc5a to
2308b77
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/labeler.yml (1)
16-18: 시크릿 전달 OK, 스코프 최소화 확인 필요.
ORGANIZATION_TOKEN존재/권한(예: private repo 라벨 변경에 필요한 repo 권한) 확인 바랍니다. 포크 PR에도 적용하려면 시크릿 미전달 제약을 고려해야 합니다.
- 내부 PR만 대상이면 현 구성 유지.
- 포크 PR까지 커버하려면 대안(예: 다른 트리거/아키텍처) 검토 필요.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/labeler.yml(1 hunks).github/workflows/pr-reminder.yml(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/pr-reminder.yml
🔇 Additional comments (2)
.github/workflows/labeler.yml (2)
8-10: 재사용 워크플로우 경로 확인 권장.리포지토리명이
.github인 중앙 리포를 가리킬 때.github/.github/workflows/...경로가 맞습니다. 해당 파일이main브랜치에 존재하는지 확인만 부탁드립니다.
11-15:pr-number입력 전달 방식 적절.
pull_request_review이벤트 컨텍스트에서github.event.pull_request.number사용은 유효합니다.재사용 워크플로우의 입력 스키마가
pr-number를 기대하는지 확인해 주세요(이름 불일치 시 실패).
| on: | ||
| pull_request_review: | ||
| types: [submitted, dismissed] | ||
|
|
||
| jobs: |
There was a problem hiding this comment.
GITHUB_TOKEN 권한 미지정 → 라벨 추가 실패 위험(403).
pull-requests: write 이 없으면 재사용 워크플로우에서 라벨 추가가 막힐 수 있습니다. 최소 권한을 명시하세요.
적용 제안:
on:
pull_request_review:
types: [submitted, dismissed]
+permissions:
+ contents: read
+ pull-requests: write🤖 Prompt for AI Agents
In .github/workflows/labeler.yml around lines 3 to 7, the workflow does not
declare GITHUB_TOKEN permissions which can cause 403 when adding labels; add a
top-level permissions entry granting at minimum pull-requests: write (or the
specific write permission the label action requires) so the reused workflow can
add labels successfully, e.g., include a permissions block with pull-requests:
write (and any additional minimal write perms required by the label action).
중앙 관리되는 Reusable Workflow를 사용하여 PR 자동 라벨링 및 리마인더 기능을 추가합니다.
Summary by CodeRabbit